package com.drm.netschool.mapper;

import com.drm.netschool.entity.DrmAgentApply;
import com.drm.netschool.entity.DrmAgentApplyExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface DrmAgentApplyMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_agent_apply
     *
     * @mbggenerated Sat Aug 15 07:33:43 CST 2015
     */
    int countByExample(DrmAgentApplyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_agent_apply
     *
     * @mbggenerated Sat Aug 15 07:33:43 CST 2015
     */
    int deleteByExample(DrmAgentApplyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_agent_apply
     *
     * @mbggenerated Sat Aug 15 07:33:43 CST 2015
     */
    @Delete({
        "delete from drm_agent_apply",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_agent_apply
     *
     * @mbggenerated Sat Aug 15 07:33:43 CST 2015
     */
    @Insert({
        "insert into drm_agent_apply (id, corn_name, ",
        "applyer_name, applyer_tel, ",
        "applyer_email, apply_txt, ",
        "apply_dt)",
        "values (#{id,jdbcType=INTEGER}, #{cornName,jdbcType=VARCHAR}, ",
        "#{applyerName,jdbcType=VARCHAR}, #{applyerTel,jdbcType=VARCHAR}, ",
        "#{applyerEmail,jdbcType=VARCHAR}, #{applyTxt,jdbcType=VARCHAR}, ",
        "#{applyDt,jdbcType=TIMESTAMP})"
    })
    int insert(DrmAgentApply record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_agent_apply
     *
     * @mbggenerated Sat Aug 15 07:33:43 CST 2015
     */
    int insertSelective(DrmAgentApply record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_agent_apply
     *
     * @mbggenerated Sat Aug 15 07:33:43 CST 2015
     */
    List<DrmAgentApply> selectByExample(DrmAgentApplyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_agent_apply
     *
     * @mbggenerated Sat Aug 15 07:33:43 CST 2015
     */
    @Select({
        "select",
        "id, corn_name, applyer_name, applyer_tel, applyer_email, apply_txt, apply_dt",
        "from drm_agent_apply",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ResultMap("BaseResultMap")
    DrmAgentApply selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_agent_apply
     *
     * @mbggenerated Sat Aug 15 07:33:43 CST 2015
     */
    int updateByExampleSelective(@Param("record") DrmAgentApply record, @Param("example") DrmAgentApplyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_agent_apply
     *
     * @mbggenerated Sat Aug 15 07:33:43 CST 2015
     */
    int updateByExample(@Param("record") DrmAgentApply record, @Param("example") DrmAgentApplyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_agent_apply
     *
     * @mbggenerated Sat Aug 15 07:33:43 CST 2015
     */
    int updateByPrimaryKeySelective(DrmAgentApply record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_agent_apply
     *
     * @mbggenerated Sat Aug 15 07:33:43 CST 2015
     */
    @Update({
        "update drm_agent_apply",
        "set corn_name = #{cornName,jdbcType=VARCHAR},",
          "applyer_name = #{applyerName,jdbcType=VARCHAR},",
          "applyer_tel = #{applyerTel,jdbcType=VARCHAR},",
          "applyer_email = #{applyerEmail,jdbcType=VARCHAR},",
          "apply_txt = #{applyTxt,jdbcType=VARCHAR},",
          "apply_dt = #{applyDt,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(DrmAgentApply record);
}